package com.wisdom.disposition.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 11951
 * Date: 2025-03-14
 * Time: 14:22
 */

/*
* yml配置读取
* */
@RestController
public class ReadYml {
    @Value("${String.hello}")
    private String hello;
    @RequestMapping("/getHello")
    public String getHello(){
        return "读取到的值："+hello;
    }

    @Value("${String.str1}")
     private String str1;
    @Value("${String.str2}")
    private String str2;
    @Value("${String.str3}")
    private String str3;
    @RequestMapping("/yml")

    public String readYml(){
        System.out.println(str1);
        System.out.println(str2);
        System.out.println(str3);
        return "yml";
    }

}
